import request from '../utils/request'

export function getUserInfo(data) {
  return request({
    url: '/user/getinfo',
    method: 'get',
    data
  })
}

export function getUserInfoGroup(data) {
  return request({
    url: '/user/getUserInfoGroup',
    method: 'post',
    data
  })
}

export function getUserPage(val) {
  return request({
    url: '/user/getinfo?page=' + val,
    method: 'get',
    val
  })
}

export function getUserGroupPage(val, data) {
  return request({
    url: '/user/getUserInfoGroup?page=' + val,
    method: 'post',
    val, data
  })
}

export function addUserInfo(data) {
  return request({
    url: '/user/addinfo',
    method: 'post',
    data
  })
}

export function deleteUserInfo(data) {
  return request({
    url: '/user/deleteInfo',
    method: 'post',
    data
  })
}

export function updateUserInfo(data) {
  return request({
    url: '/user/updateInfo',
    method: 'post',
    data
  })
}

export function searchInfo(data) {
  return request({
    url: '/user/searchInfo',
    method: 'post',
    data
  })
}

export function updateIntegral(data) {
  return request({
    url: '/user/updateIntegral',
    method: 'post',
    data
  })
}

export function selectRoles(data) {
  return request({
    url: '/user/selectRoles',
    method: 'post',
    data
  })
}

export function insertRoles(data) {
  return request({
    url: '/user/insertRoles',
    method: 'post',
    data
  })
}
